package com.atguigu.gulimall.order;

import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * 使用rabbitMQ
 * 1.引入amqp场景（pom引入），RabbitAutoConfiguration 就会自动生效
 * 2.给容器中自动配置了
 *      RabbitTemplate、AmqpAdmin、CachingConnectionFactory、RabbitMessagingTemplate
 * 3.EnableRabbit  开启功能
 * 4.监听消息，使用@RabbitListener ,必须要 @EnableRabbit 才能使用
 *      @RabbitListener：标注在，类和方法上
 *      @RabbitHandler:标在方法上
 *
 *
 * Seata控制分布式事务
 *  1）、每个服务必须创建undo_log表；
 *
 */
@EnableRabbit
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class GulimallOrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallOrderApplication.class, args);
    }

}
